package com.mysite.dubbox.facade.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.mysite.dubbox.facade.UserFacade;
import com.mysite.dubbox.service.UserService;
import com.mysite.dubbox.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;

@Service(protocol = {"rest", "dubbo"}, validation = "true", version="1.0.0")
public class UserFacadeImpl implements UserFacade {

    @Autowired
    private UserService userService;

    public UserVo getUser(Long id) {
        return userService.getUser(id);
    }

    public Long registerUser(UserVo user) {
        return userService.addUser(user);
    }
}
